<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>获取客户端的IP</title>
<script type="text/javascript" src="jquery/jquery-1.7.2.min.js"></script>
<script language="javascript">
jQuery(function($){
	//设定要请求的目标地址的url
	var url = 'http://chaxun.1616.net/s.php?type=ip&output=json&callback=?&_='+Math.random();  
	$.getJSON(url, function(data){  //请求json数据
		alert(data.Ip);               //显示客户端的IP
	});
});
</script>
</head>

<body>
</body>
</html>
